package cn.fldong.model;

import java.sql.Date;
import java.sql.Timestamp;

/**
 * 班级实体类，对应classes表
 * 注意：使用ClassInfo作为类名是因为Class是Java关键字
 */
public class ClassInfo {
    private String classId; // 班级ID，如：CS202301
    private String className; // 班级名称
    private String grade; // 年级，如：2023级
    private String major; // 专业
    private String headTeacher; // 班主任姓名
    private String headTeacherPhone; // 班主任电话
    private String headTeacherEmail; // 班主任邮箱
    private String classroom; // 教室
    private int maxStudentCount; // 最大学生数量
    private Date createDate; // 创建日期
    private String classDescription; // 班级描述
    private Timestamp createdAt; // 创建时间
    private Timestamp updatedAt; // 更新时间
    
    // 无参构造函数
    public ClassInfo() {
    }
    public ClassInfo(String classId, String className, String grade, String major) {
        this.classId = classId;
        this.className = className;
        this.grade = grade;
        this.major = major;
    }
    // 全参构造函数
    public ClassInfo(String classId, String className, String grade, String major,
                    String headTeacher, String headTeacherPhone, String headTeacherEmail,
                    String classroom, int maxStudentCount, Date createDate, 
                    String classDescription, Timestamp createdAt, Timestamp updatedAt) {
        this.classId = classId;
        this.className = className;
        this.grade = grade;
        this.major = major;
        this.headTeacher = headTeacher;
        this.headTeacherPhone = headTeacherPhone;
        this.headTeacherEmail = headTeacherEmail;
        this.classroom = classroom;
        this.maxStudentCount = maxStudentCount;
        this.createDate = createDate;
        this.classDescription = classDescription;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    
    // Getters and Setters
    public String getClassId() {
        return classId;
    }
    
    public void setClassId(String classId) {
        this.classId = classId;
    }
    
    public String getClassName() {
        return className;
    }
    
    public void setClassName(String className) {
        this.className = className;
    }
    
    public String getGrade() {
        return grade;
    }
    
    public void setGrade(String grade) {
        this.grade = grade;
    }
    
    public String getMajor() {
        return major;
    }
    
    public void setMajor(String major) {
        this.major = major;
    }
    
    public String getHeadTeacher() {
        return headTeacher;
    }
    
    public void setHeadTeacher(String headTeacher) {
        this.headTeacher = headTeacher;
    }
    
    public String getHeadTeacherPhone() {
        return headTeacherPhone;
    }
    
    public void setHeadTeacherPhone(String headTeacherPhone) {
        this.headTeacherPhone = headTeacherPhone;
    }
    
    public String getHeadTeacherEmail() {
        return headTeacherEmail;
    }
    
    public void setHeadTeacherEmail(String headTeacherEmail) {
        this.headTeacherEmail = headTeacherEmail;
    }
    
    public String getClassroom() {
        return classroom;
    }
    
    public void setClassroom(String classroom) {
        this.classroom = classroom;
    }
    
    public int getMaxStudentCount() {
        return maxStudentCount;
    }
    
    public void setMaxStudentCount(int maxStudentCount) {
        this.maxStudentCount = maxStudentCount;
    }
    
    public Date getCreateDate() {
        return createDate;
    }
    
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    public String getClassDescription() {
        return classDescription;
    }
    
    public void setClassDescription(String classDescription) {
        this.classDescription = classDescription;
    }
    
    public Timestamp getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }
    
    public Timestamp getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }
    
    @Override
    public String toString() {
        return "ClassInfo{" +
                "classId='" + classId + '\'' +
                ", className='" + className + '\'' +
                ", grade='" + grade + '\'' +
                ", major='" + major + '\'' +
                ", headTeacher='" + headTeacher + '\'' +
                ", headTeacherPhone='" + headTeacherPhone + '\'' +
                ", headTeacherEmail='" + headTeacherEmail + '\'' +
                ", classroom='" + classroom + '\'' +
                ", maxStudentCount=" + maxStudentCount +
                ", createDate=" + createDate +
                ", classDescription='" + classDescription + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}